function preInit(){
trtmpl=document.all.table4.rows[0].cloneNode(true);

document.all.table4.deleteRow(0);
document.all.table4.firstChild;
//alert(trtmpl.innerHTML);
document.all.condition.focus();
}

function searchInfor(url){
		//alert(url);
		var myAjax = new Ajax.Request(
					url, 
					{ 
						method: 'post', 
						asynchronous:false
					
				}); 
		var myXML = myAjax.transport.responseXML;
		tblclear();
		tblclear();
		
		showList(myXML);
}

function tblclear(){
	
	//return false;
	try{
		var rows=document.all.table4.rows;
		if(rows){
			var row;
			for(var i=0;i<rows.length;i++){
				row=rows[i];
				document.all.table4.removeChild(row);
			}
		
		}
	}catch(e){
		alert(e);
	}
	
}
function showList(doc){
 var listNode=doc.selectNodes("NODES/NODE");
 if(listNode){
 	var node;
 	var newtr;
 	for(var i=0;i<listNode.length;i++){
 		try{
 			node=listNode[i];
	 		newtr=trtmpl.cloneNode(true);
	 		document.all.table4.appendChild(newtr);
	 		document.all.table4.innerText
	 		var tdNode=newtr.firstChild;
	 		tdNode.innerText=node.getAttribute('name');
	 		newtr.idval=node.getAttribute('id');
	 		newtr.nameval=node.getAttribute('name');
	 		newtr.onclick=function(){
	 			returnTime(this.idval,this.nameval);
	 		}
 		}catch(e){
 			alert(e);
 		}
 		
 	}
 
 }else{
 	alert('没有检索到数据！');
 }
}
function returnTime(id,name){
	var rtnObj = new Object();
	rtnObj.id =id;
	rtnObj.name=name;
	alert(name);
	returnValue = rtnObj;
	window.close();
}